import mypipe_lib
import time
if __name__ == '__main__':
    index = 0

    print ("a")
    mypipe_lib.pipe_destory()

    print("b")
    mypipe_lib.pipe_create()

    print("c")
    ff = open('/tmp/chiasyncpi', 'r')
    while True:
        #mypipe_lib.pipe_write(str(time.time()))
        #print ("c1" + str(index) + ":" + str(time.time()))

        index += 1
        print("s：" + str(index) + "-----------------------\n")
        #plots = mypipe_lib.pipe_read()

        print (mypipe_lib.pipe_read(ff))

        time.sleep(1)